Class MACSwitchImpl

All Implemented Interfaces:
IPCObject, MACSwitch, Process

public class MACSwitchImpl extends ProcessImpl implements MACSwitch
Information provided by the PKI file:

    \class MacSwitch
    
    \brief MacSwitch handles and manipulates the MAC address table.
    
    \example network().getDevice("Switch0").getProcess("MacSwitcher")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • addStaticMac

      public boolean addStaticMac(MACAddress macAddress, int vlanNumber, String portName)
      Information provided by the PKI file:
      
          \brief Adds a static MAC address to the specified port.
          
          \param macAddress, the static MAC address.
          \param vlanNumber, the VLAN number.
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      addStaticMac in interface MACSwitch
      Parameters:
      macAddress - Takes in a parameter of macAddress
      vlanNumber - Takes in a parameter of vlanNumber
      portName - Takes in a parameter of portName
      Returns:
      boolean Returns a boolean
    • removeStaticMac

      public boolean removeStaticMac(MACAddress macAddress, int vlanNumber, String portName)
      Information provided by the PKI file:
      
          \brief Removes the static MAC address from the specified port.
          
          \param macAddress, the static MAC address of interest.
          \param vlanNumber, the VLAN number of interest.
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      removeStaticMac in interface MACSwitch
      Parameters:
      macAddress - Takes in a parameter of macAddress
      vlanNumber - Takes in a parameter of vlanNumber
      portName - Takes in a parameter of portName
      Returns:
      boolean Returns a boolean
    • getStaticMacCount

      public int getStaticMacCount()
      Information provided by the PKI file:
      
          \brief Returns the number of static MAC addresses configured.
          
          \return int, the number of static MAC addresses configured.
          
              
      Specified by:
      getStaticMacCount in interface MACSwitch
      Returns:
      int Returns a int
    • getGlobalMacAt

      public StaticMac getGlobalMacAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the static MAC address at the specified index.
          
          \param index, the index of the static MAC address of interest.
          
          \return StaticMac, the StaticMac object at the specified index.
          
              
      Specified by:
      getGlobalMacAt in interface MACSwitch
      Parameters:
      index - Takes in a parameter of index
      Returns:
      StaticMac Returns a StaticMac
    • portExistedInStatic

      public boolean portExistedInStatic(String portName)
      Information provided by the PKI file:
      
          \param Returns true if the specified port has a static MAC address, otherwise false.
          
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          
          \return bool, true if the specified port has a static MAC address, otherwise false.
          
              
      Specified by:
      portExistedInStatic in interface MACSwitch
      Parameters:
      portName - Takes in a parameter of portName
      Returns:
      boolean Returns a boolean
    • isEntryExisted

      public boolean isEntryExisted(MACAddress macAddress, int vlanNumber, String portName)
      Information provided by the PKI file:
      
          \brief Returns true if the specified entry exists in the MAC address table, otherwise false.
          
          \param macAddress, the static MAC address of interest.
          \param vlanNumber, the VLAN number of interest.
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          
          \return bool, true if the specified entry exists in the MAC address table, otherwise false.
          
              
      Specified by:
      isEntryExisted in interface MACSwitch
      Parameters:
      macAddress - Takes in a parameter of macAddress
      vlanNumber - Takes in a parameter of vlanNumber
      portName - Takes in a parameter of portName
      Returns:
      boolean Returns a boolean